package edzest.basic;

import java.util.Scanner;

public class sil03 {

	public static void main(String[] args) {
		Scanner sc = null;
		int charge;
		int w10;
		int w50;
		int w100;
		int w500;
		int w1000;
		int w5000;
		int w10000;
		int w50000;
		int rest;
		
		sc = new Scanner(System.in);
		System.out.print("금액을 입력 ");
		charge = sc.nextInt();
		sc.close();
		w50000 = charge / 50000;
		//w10000 = (charge - (w50000*50000)) / 10000;
		rest = charge - (w50000*50000);
		w10000 = rest / 10000;
		rest = rest - (w10000*10000);
		w5000 = rest / 5000;
		rest = rest - (w5000*5000);
		w1000 = rest / 1000;
		rest = rest - (w1000*1000);
		w500 = rest / 500;
		rest = rest - (w500*500);
		w100 = rest / 100;
		rest = rest - (w100*100);
		w50 = rest / 50;
		rest = rest - (w50*50);
		w10 = rest / 10;
		rest = rest - (w10*10);
		
		System.out.println("지불 금액:\t\t"+charge);
		System.out.println("50000원 갯수:\t"+w50000);
		System.out.println("10000원 갯수:\t"+w10000);
		System.out.println("5000원 갯수:\t"+w5000);
		System.out.println("1000원 갯수:\t"+w1000);
		System.out.println("500원 갯수:\t"+w500);
		System.out.println("100원 갯수:\t"+w100);
		System.out.println("50원 갯수:\t\t"+w50);
		System.out.println("10원 갯수:\t\t"+w10);
		System.out.println("남은 금액:\t\t"+rest);
	}

}
